<%@ page language="java"  pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<%=path %>/styles/main.css" rel="stylesheet" type="text/css" />
<link href="<%=path %>/js/dialog/skin/ymPrompt.css"  rel="stylesheet" id='skin' type="text/css"/> 

<script type="text/javascript" src="<%=path %>/js/main.js"></script>
<script type="text/javascript" src="<%=path %>/js/dialog/ymPrompt.js" ></script>
<script type="text/javascript" src="<%=path%>/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.form.js"></script>
<script type="text/javascript">
	function save(){
	    var form = $("form[name=empForm]"); 
        var options = {success:showResponse,resetForm:false,dataType:'script'};
        form.ajaxSubmit(options);       
        return;   
	}
	function showResponse(data){//回调函数
	    if(1 == data){
	    	document.getElementById("MsgDiv").innerHTML="保存成功！";
	    	parent.loadPage();	     
	    }else{
	        document.getElementById("MsgDiv").innerHTMNL="操作失败";
	    }
	}
</script>
</head>
<body>
<form id="empForm" name="empForm"  method="post" action="<%=path %>/system/employee/save.do"> 
<div id="DetailContent">	
	<table width="100%" border="0" cellspacing="2" cellpadding="2"  class="TableForm">
	  <tr>
		<td  nowrap="nowrap" width="80">员工名称：</td>
		 <td class="NTbsM">
		 	<input name="empId" type="hidden" value='<s:property value="employee.empId"/>'/>
		 	<input name="empName" type="text" value='<s:property value="employee.empName"/>' class="InputText" onfocus="this.className='InputTextDown'" onblur="this.className='InputText'" />
		 </td>
		 <td  nowrap="nowrap" width="80">员工编号：</td>
		 <td class="NTbsM">		 	
		 	<input name="empNo" type="text" value='<s:property value="employee.empNo"/>' class="InputText" onfocus="this.className='InputTextDown'" onblur="this.className='InputText'" />
		 </td>
	  </tr>
	  <tr>
		 <td  nowrap="nowrap" width="80">所属部门：</td>
		 <td class="NTbsM">
		 	<input name="deptId" type="text" value='<s:property value="employee.deptId"/>' class="InputText" onfocus="this.className='InputTextDown'" onblur="this.className='InputText'" />
		 </td>
		 <td  nowrap="nowrap" width="80">&nbsp;</td>
		 <td class="NTbsM">&nbsp;</td>
	  </tr>
	</table>
</div>  
<!--工具按钮-->
<div  id="FormToobar" style="margin:0 5px; border: solid 1px #6d6d6d;">
	<div id="MsgDiv" style="float:left"></div>
	<div style="float:right">
	    <tt><input name="保存23" type="button" class="But" value="保存" onclick="save()"/> </tt>
	    <tt><input name="返回23" type="button" class="But" value="返回" onclick="parent.ymPrompt.close();" /></tt>
    </div>	
</div>
</form>
</body>
</html>
